package com.ipfsemc.ipfsemc.service.imp;

import com.ipfsemc.ipfsemc.mapper.WithdrawMapper;
import com.ipfsemc.ipfsemc.model.Withdraw;
import com.ipfsemc.ipfsemc.service.IWithdrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.List;

@Service
public class WithdrawServiceImpl implements IWithdrawService {
    @Autowired
    private WithdrawMapper withdrawMapper;

    @Override
    public int add(Withdraw withdraw) {

        return withdrawMapper.insertSelective(withdraw);
    }

    @Override
    public int update(Withdraw withdraw) {
        return withdrawMapper.updateByPrimaryKeySelective(withdraw);
    }

    @Override
    public List<Withdraw> listByUser(Withdraw withdraw) {
        return withdrawMapper.listByUser(withdraw);
    }
}
